import java.util.ArrayList;


public abstract class Graph {
	
	private ArrayList<Node> nodes;
	
	public Graph(int numberNodes){
		this.nodes = new ArrayList<Node>();
		for(int i=0;i<numberNodes;i++)
			this.nodes.add(new Node());
		for(int i=0;i<numberNodes;i++){
			for(int j=0;j<numberNodes;j++){
				if(i!=j)
					this.nodes.get(i).getLinkedNodes().add(new NodePheromoneRelation(nodes.get(j),0.0));
			}
		}
	}
	
	public void exploreNewPath(Ant ant){
		ArrayList<Node> path = new ArrayList<Node>();
		path.add(this.nodes.get(0));
		this.nodes.get(0).chooseWay(ant);
	}

	public ArrayList<Node> getNodes() {
		return nodes;
	}

	public void setNodes(ArrayList<Node> nodes) {
		this.nodes = nodes;
	}
	
	public abstract double getFitness(ArrayList<Node> nodes);
	
	public abstract boolean verifyStopCriteria(Object[] params);
}
